/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DialogBoundingBox.java
 *
 * Created on Apr 12, 2009, 2:10:02 AM
 */

package test;

import java.text.DecimalFormat;
import javax.swing.JButton;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.WindowConstants;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.NumberFormatter;
import org.netbeans.lib.awtextra.AbsoluteConstraints;
import org.netbeans.lib.awtextra.AbsoluteLayout;

/**
 *
 * @author Naruto
 */
public class DialogBoundingBox extends javax.swing.JFrame {

    /** Creates new form DialogBoundingBox */
    public DialogBoundingBox() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabelBoundingBox = new JLabel();
        jLabelPosX = new JLabel();
        jLabelPosY = new JLabel();
        jLabelWidth = new JLabel();
        jLabelHeight = new JLabel();
        PosX = new JFormattedTextField();
        PosY = new JFormattedTextField();
        Width = new JFormattedTextField();
        Height = new JFormattedTextField();
        OK = new JButton();
        Cancel = new JButton();

        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(new AbsoluteLayout());

        jLabelBoundingBox.setText("Bounding Box");
        getContentPane().add(jLabelBoundingBox, new AbsoluteConstraints(10, 10, -1, -1));

        jLabelPosX.setText("Pos X:");
        getContentPane().add(jLabelPosX, new AbsoluteConstraints(10, 50, -1, -1));

        jLabelPosY.setText("Pos Y:");
        getContentPane().add(jLabelPosY, new AbsoluteConstraints(10, 80, -1, -1));

        jLabelWidth.setText("Width:");
        getContentPane().add(jLabelWidth, new AbsoluteConstraints(120, 50, -1, -1));

        jLabelHeight.setText("Height:");
        getContentPane().add(jLabelHeight, new AbsoluteConstraints(120, 80, -1, -1));

        PosX.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(new DecimalFormat("#0"))));
        getContentPane().add(PosX, new AbsoluteConstraints(50, 50, 60, -1));

        PosY.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(new DecimalFormat("#0"))));
        getContentPane().add(PosY, new AbsoluteConstraints(50, 80, 60, -1));

        Width.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(new DecimalFormat("#0"))));
        getContentPane().add(Width, new AbsoluteConstraints(160, 50, 60, -1));

        Height.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(new DecimalFormat("#0"))));
        getContentPane().add(Height, new AbsoluteConstraints(160, 80, 60, -1));

        OK.setText("OK");
        getContentPane().add(OK, new AbsoluteConstraints(97, 120, 60, -1));

        Cancel.setText("Cancel");
        getContentPane().add(Cancel, new AbsoluteConstraints(160, 120, -1, -1));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DialogBoundingBox().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private JButton Cancel;
    private JFormattedTextField Height;
    private JButton OK;
    private JFormattedTextField PosX;
    private JFormattedTextField PosY;
    private JFormattedTextField Width;
    private JLabel jLabelBoundingBox;
    private JLabel jLabelHeight;
    private JLabel jLabelPosX;
    private JLabel jLabelPosY;
    private JLabel jLabelWidth;
    // End of variables declaration//GEN-END:variables

}
